package com.example.micrograss.grass.controller;
import com.example.common.core.common.R;
import com.example.micrograss.grass.service.IGrassLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/article")
public class GrassLikeController {

    @Autowired
    private IGrassLikeService grassLikeService;
    /**
     * 点赞/取消点赞
     */
    @GetMapping("/like")
    public R like(Integer articleId){
        grassLikeService.like(articleId);
        return R.ok();
    }
}